﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace mvc_diary_content.Models
{
    public class Diary
    {
        public int Id { get; set; }

        [StringLength(60, MinimumLength = 2)]
        [Required]
        public string? Title { get; set; }

        [Display(Name = "CreateDate")]
        [DataType(DataType.DateTime)]
        public DateTime CreateDate { get; set; }

        [Display(Name = "UpdateDate")]
        [DataType(DataType.Date)]
        public DateTime UpdateDate { get; set; }

        public int Read { get; set; }
        public int Heart { get; set; }

        public string? Content { get; set; }

    }
}
